package cn.edu.zut.internship.bean.sys;


import cn.edu.zut.internship.entity.AuthSysRole;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

public class SysUser implements Serializable {
    private static final long serialVersionUID = 1L;//序列化id
    private long userId;
    private String userAccount;
    private String userPhone;
    private String userName;
    private String password;
    private int sex;
    private int userType;//0：管理员、1：教师、2：学生
    private String userEmail;
    private  String avatar;//头像链接

    private int notifyNum;//未读消息数
    private String userSign;//个性签名

    public String getUserSign() {
        return userSign;
    }

    public void setUserSign(String userSign) {
        this.userSign = userSign;
    }

    public int getNotifyNum() {
        return notifyNum;
    }

    public void setNotifyNum(int notifyNum) {
        this.notifyNum = notifyNum;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    /**
     * 用户对应的角色集合
     */
    private Set<Long> roles;

    //角色列表
    private List<AuthSysRole> roleList;

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }


    public SysUser() {
    }

    public SysUser(long id, String userName, String password, Set<Long> roles) {
        this.userId = id;
        this.userName = userName;
        this.password = password;
        this.roles = roles;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long id) {
        this.userId = id;
    }

    public String getUsername() {
        return userName;
    }

    public void setUsername(String username) {
        this.userName = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<AuthSysRole> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<AuthSysRole> roleList) {
        this.roleList = roleList;
    }

    public Set<Long> getRoles() {
        return roles;
    }

    public void setRoles(Set<Long> roles) {
        this.roles = roles;
    }
}